/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.kj.order.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.kj.order.entity.KjOrderShipping;
import com.jeesite.modules.kj.order.dao.KjOrderShippingDao;
import com.jeesite.modules.file.utils.FileUploadUtils;

/**
 * order_shippingService
 * @author hzy
 * @version 2019-11-29
 */
@Service
@Transactional(readOnly=true)
public class KjOrderShippingService extends CrudService<KjOrderShippingDao, KjOrderShipping> {
	
	/**
	 * 获取单条数据
	 * @param kjOrderShipping
	 * @return
	 */
	@Override
	public KjOrderShipping get(KjOrderShipping kjOrderShipping) {
		return super.get(kjOrderShipping);
	}
	
	/**
	 * 查询分页数据
	 * @param kjOrderShipping 查询条件
	 * @param kjOrderShipping.page 分页对象
	 * @return
	 */
	@Override
	public Page<KjOrderShipping> findPage(KjOrderShipping kjOrderShipping) {
		return super.findPage(kjOrderShipping);
	}
	
	/**
	 * 保存数据（插入或更新）
	 * @param kjOrderShipping
	 */
	@Override
	@Transactional(readOnly=false)
	public void save(KjOrderShipping kjOrderShipping) {
		super.save(kjOrderShipping);
		// 保存上传图片
		FileUploadUtils.saveFileUpload(kjOrderShipping.getId(), "kjOrderShipping_image");
		// 保存上传附件
		FileUploadUtils.saveFileUpload(kjOrderShipping.getId(), "kjOrderShipping_file");
	}
	
	/**
	 * 更新状态
	 * @param kjOrderShipping
	 */
	@Override
	@Transactional(readOnly=false)
	public void updateStatus(KjOrderShipping kjOrderShipping) {
		super.updateStatus(kjOrderShipping);
	}
	
	/**
	 * 删除数据
	 * @param kjOrderShipping
	 */
	@Override
	@Transactional(readOnly=false)
	public void delete(KjOrderShipping kjOrderShipping) {
		super.delete(kjOrderShipping);
	}
	
}